package io.terminus.lego.shinda.web.controller

import io.swagger.annotations.Api
import io.terminus.lego.shinda.service.service.UserService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.security.core.Authentication
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService
import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody
import org.springframework.web.bind.annotation.RestController

/**
 * @author wangmeng
 * @date 2018/4/3
 */
@Api("主页接口")
@RestController
@RequestMapping("/api/index")
class IndexController {

    @GetMapping("/info")
    @ResponseBody
    fun info(token: Authentication): Any? {
        return token
    }

}